package org.springblade.modules.admin.service.parts;

import org.springblade.common.utils.feishu.FeiShuUtil;
import org.springblade.core.tool.utils.SpringUtil;
import org.springblade.modules.admin.entity.MaintainPlanContent;
import org.springblade.modules.admin.service.IBusinessApproveService;
import org.springblade.modules.admin.service.IMaintainPlanContentService;
import org.springblade.modules.admin.service.MaintainMalfunctionLogService;
import org.springblade.modules.admin.service.MaintainPartsWorkService;
import org.springblade.modules.admin.vo.parts.PartsExecuteVO;
import org.springblade.modules.system.service.IUserService;

/**
 * @Description 工单状态策略
 * @Author ysq
 * @Date 2024/05/16
 **/
public interface OrderStateStrategy {

	IMaintainPlanContentService maintainPlanContentService = SpringUtil.getBean(IMaintainPlanContentService.class);
	IBusinessApproveService businessApproveService = SpringUtil.getBean(IBusinessApproveService.class);
	MaintainPartsWorkService maintainPartsWorkService = SpringUtil.getBean(MaintainPartsWorkService.class);
	MaintainMalfunctionLogService maintainMalfunctionLogService = SpringUtil.getBean(MaintainMalfunctionLogService.class);
	IUserService userService = SpringUtil.getBean(IUserService.class);
	FeiShuUtil feiShuUtil = SpringUtil.getBean(FeiShuUtil.class);

	/**
	 * 状态流转前置校验
	 * @param executeParams 执行参数
	 * @return 返回值
	 */
	boolean check(PartsExecuteVO executeParams);

	/**
	 * 状态流转统一入口
	 * @param executeParams 执行参数
	 * @return 返回值
	 */
	Object execute(PartsExecuteVO executeParams);

	/**
	 * 状态流转处理器，由各个策略实现
	 * @param executeParams 执行参数
	 * @return 返回值
	 */
	Object handle(PartsExecuteVO executeParams);

	/**
	 * 状态流转后置处理
	 * @param executeParams 执行参数
	 */
	void after(PartsExecuteVO executeParams);

}
